package com.aqie.appletserver.context;

/**
 * 保存baidu api token
 */
public class TokenContext {
    // 数据每个线程存一份
    private static ThreadLocal<String> tokenBaidu = new ThreadLocal<>();
    public static String getToken() {
        return tokenBaidu.get();
    }

    public static void setToken(String tokenStr) {
        tokenBaidu.set(tokenStr);
    }

    public static void removeToken(){
        tokenBaidu.remove();
    }
}
